home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 526-550 / disk_540 / sana / sana2device.spec < prev    next >
Text File  |  1992-05-06  |  48KB  |  1,881 lines

  1. $Id: sana2device.spec,v 1.11 91/05/14 14:01:47 rsbx Exp $
  2.  
  3. TABLE OF CONTENTS
  4.  
  5.  sana2.device
  6. sana2.device/Init
  7. sana2.device/Open
  8. sana2.device/Close
  9. sana2.device/BeginIO
  10. sana2.device/AbortIO
  11. sana2.device/Expunge
  12. sana2.device/CMD_READ
  13. sana2.device/CMD_WRITE
  14. sana2.device/SANA2CMD_READORPHAN
  15. sana2.device/SANA2CMD_DEVICEQUERY
  16. sana2.device/SANA2CMD_GETSTATIONADDRESS
  17. sana2.device/SANA2CMD_CONFIGINTERFACE
  18. sana2.device/SANA2CMD_ADDSTATIONALIAS
  19. sana2.device/SANA2CMD_DELSTATIONALIAS
  20. sana2.device/SANA2CMD_ADDMULTICASTADDRESS
  21. sana2.device/SANA2CMD_DELMULTICASTADDRESS
  22. sana2.device/SANA2CMD_MULTICAST
  23. sana2.device/SANA2CMD_BROADCAST
  24. sana2.device/SANA2CMD_TRACKTYPE
  25. sana2.device/SANA2CMD_UNTRACKTYPE
  26. sana2.device/SANA2CMD_GETTYPESTATS
  27. sana2.device/SANA2CMD_GETSPECIALSTATS
  28. sana2.device/SANA2CMD_GETGLOBALSTATS
  29. sana2.device/SANA2CMD_ONEVENT
  30. sana2.device/SANA2CMD_ONLINE
  31. sana2.device/SANA2CMD_OFFLINE
  32. sana2.device/CMD_START
  33. sana2.device/CMD_STOP
  34. sana2.device/CMD_CLEAR
  35. sana2.device/CMD_FLUSH
  36. sana2.device/CMD_INVALID
  37. sana2.device/CMD_RESET
  38. sana2.device/CMD_UPDATE
  39.  
  40.  
  41. ******* sana2.device *************************************************
  42. *
  43. *    The SANA-II device specification represents a Data Transfer
  44. *    Level interface standard for Amigas. The intent is: 1) for all
  45. *    Amiga network hardware vendors to create a SANA-II device
  46. *    driver for their hardware, 2) for all protocol stack writers
  47. *    to access the networks via SANA-II device drivers, 3) any
  48. *    protocol stack to work with any SANA-II device driver.
  49. *
  50. *
  51. *   GOALS
  52. *    Simplicity: A SANA-II device driver should be as simple to
  53. *    write as any other Amiga device.
  54. *
  55. *    Low cost: A functional SANA-II device driver should take about
  56. *    one man month or less for an experienced Amiga programmer with
  57. *    Amiga device writing experience to write. A tuned and polished
  58. *    SANA-II device should require only one additional man month.
  59. *
  60. *    Compatibility: All SANA-II device drivers behave largely the
  61. *    same.
  62. *
  63. *    Low resource usage: A SANA-II device driver should not require
  64. *    large amounts of memory, cpu cycles or any other system
  65. *    resource to operate efficiently.
  66. *
  67. *    Ease of use: Using SANA-II devices should be the easiest way
  68. *    for protocol stack writers to access the networks.
  69. *
  70. *
  71. *   NON-GOALS
  72. *    Lowest common denominator: Not all network interfaces can
  73. *    support all the features available in this specification or
  74. *    other network types.
  75. *
  76. *    Feature-itis: Not every feature of every type of network is
  77. *    represented.
  78. *
  79. *    Network management tools: Analysis and debugging of a network
  80. *    requires specialized software for that purpose.
  81. *
  82. *
  83. *   STRUCTURES
  84. *        struct IOSana2Req
  85. *            {
  86. *            struct Message S2io_Message;
  87. *            struct Device *S2io_Device;
  88. *            struct Unit   *S2io_Unit;
  89. *
  90. *            UWORD S2io_Command;
  91. *            UBYTE S2io_Flags;
  92. *            BYTE  S2io_Error;
  93. *            ULONG S2io_WireError;
  94. *
  95. *            struct Sana2PacketType *S2io_PacketType;
  96. *            UBYTE S2io_SrcAddr[SANA2_MAX_ADDR_BYTES];
  97. *            UBYTE S2io_DstAddr[SANA2_MAX_ADDR_BYTES];
  98. *            ULONG S2io_DataLength;
  99. *            struct NetBuff S2io_Body;
  100. *            void *S2io_StatData;
  101. *            };
  102. *
  103. *        Message
  104. *            Initialized and used the same as all device IORequest
  105. *            Message structures.
  106. *
  107. *        Device
  108. *            Device private.
  109. *
  110. *        Unit
  111. *            Device private.
  112. *
  113. *        Command
  114. *            Command requested.
  115. *
  116. *        Flags
  117. *            Used to request special options and return status
  118. *            information.
  119. *
  120. *        Error
  121. *            Indicates completion status of a command in general
  122. *            terms.
  123. *
  124. *        WireError
  125. *            More specific error number. Only valid when S2io_Error
  126. *            is non-zero.
  127. *
  128. *        PacketType
  129. *            Pointer to a Sana2PacketType structure. The device
  130. *            uses the contents of the structure to determine if a
  131. *            packet from the network will satisfy a particular read
  132. *            command, or to build the appropriate packet header and
  133. *            trailer for a packet send. The device will not modify
  134. *            either the pointer or the structure.
  135. *
  136. *        SrcAddr
  137. *            The device fills in this field with the interface
  138. *            address of the source of the packet that satisfied a
  139. *            read command. The bytes used to hold the address will
  140. *            be left justified but the bit layout is dependent on
  141. *            the particular type of network.
  142. *
  143. *        DstAddr
  144. *            This field is filled in with the interface destination
  145. *            address of the packet for a send command. The bytes
  146. *            used to hold the address will be left justified but
  147. *            the bit layout is dependent on the particular type of
  148. *            network.
  149. *
  150. *        DataLength
  151. *            The device fills in this field with the size of the
  152. *            packet data as it was sent on the wire. This does not
  153. *            include the header and trailer information. Depending
  154. *            on the network type and protocol type, the driver may
  155. *            have to calculate this value.
  156. *
  157. *        Body
  158. *            A NetBuff structure with the packet data.
  159. *
  160. *        StatData
  161. *            Pointer to a data area in memory to place a a snapshot
  162. *            of device statics. The data area must be long word
  163. *            aligned.
  164. *
  165. *    
  166. *        struct Sana2PacketType
  167. *            {
  168. *            ULONG CanonicalType;
  169. *            ULONG Magic;
  170. *            ULONG Length;
  171. *            UBYTE *Match;
  172. *            UBYTE *Mask;
  173. *            };
  174. *
  175. *        CanonicalType
  176. *            Not used by the device.
  177. *
  178. *        Magic
  179. *            Determines how the fields in this structure are to be
  180. *            interpretted.
  181. *
  182. *        Length
  183. *            Number of bytes pointed to be Match and Mask.
  184. *
  185. *        Match
  186. *            Pointer to packet type match data. The data must be
  187. *            long word (32 bit) aligned.
  188. *
  189. *        Mask
  190. *            Pointer to packet type mask data. The data must be
  191. *            long word (32 bit) aligned.
  192. *
  193. *
  194. *        struct Sana2DeviceQuery
  195. *            {
  196. *            /*
  197. *             * Standard information
  198. *             */
  199. *            ULONG SizeAvailable;
  200. *            ULONG SizeSupplied;
  201. *            LONG DevQueryFormat;
  202. *            LONG DeviceLevel;
  203. *            /*
  204. *             * Common information
  205. *             */
  206. *            UWORD AddrFieldSize;
  207. *            ULONG MTU;
  208. *            LONG bps;
  209. *            LONG HardwareType;
  210. *            /*
  211. *             * Format specific information
  212. *             */
  213. *            };
  214. *
  215. *        SizeAvailable
  216. *            Size, in bytes, of the space available in which to
  217. *            place device information. This includes both size
  218. *            fields.
  219. *
  220. *        SizeSupplied
  221. *            Size, in bytes, of the data supplied.
  222. *
  223. *        DevQueryFormat
  224. *            The format defined here is format 0.
  225. *
  226. *        DeviceLevel
  227. *            This spec defines level 0.
  228. *
  229. *        AddrFieldSize
  230. *            The number of bits in an interface address.
  231. *
  232. *        MTU
  233. *            Maximum Transmission Unit, the size, in bytes, of the
  234. *            maximum packet size, not including header and trailer
  235. *            information.
  236. *
  237. *        bps
  238. *            Best guess at the raw line rate for this network in
  239. *            bits per second.
  240. *
  241. *        HardwareType
  242. *            Specifies the type of network wire the driver
  243. *            controls.
  244. *
  245. *
  246. *        struct Sana2PacketTypeStats
  247. *            {
  248. *            LONG PacketsSent;
  249. *            LONG PacketsReceived;
  250. *            LONG BytesSent;
  251. *            LONG BytesReceived;
  252. *            LONG PacketsDropped;
  253. *            };
  254. *
  255. *        PacketsSent
  256. *            Number of packets of a particular type sent.
  257. *
  258. *        PacketsReceived
  259. *            Number of packets of a particular type that satisfied
  260. *            a read command.
  261. *
  262. *        BytesSent
  263. *            Number of bytes of data sent in packets of a
  264. *        particular type.
  265. *
  266. *        BytesReceived
  267. *            Number of bytes of data of a particular packet type
  268. *            that satisfied a read command.
  269. *
  270. *        PacketsDropped
  271. *            Number of packets of a particular type that were
  272. *            received while there were no pending reads of that
  273. *            packet type.
  274. *
  275. *
  276. *        struct Sana2SpecialStatRecord
  277. *            {
  278. *            ULONG Type;
  279. *            LONG Count;
  280. *            char *String;
  281. *            };
  282. *
  283. *        Type
  284. *            Statistic identifier.
  285. *
  286. *        Count
  287. *            Statistic itself.
  288. *
  289. *        String
  290. *            Identifying string for the statistic. Should be plain
  291. *            ASCII with no formatting characters.
  292. *
  293. *
  294. *        struct Sana2SpecialStatHeader
  295. *            {
  296. *            ULONG RecordCountMax;
  297. *            ULONG RecordCountSupplied;
  298. *            struct Sana2SpecialStatRecord[RecordCountMax];
  299. *            };
  300. *
  301. *        RecordCountMax
  302. *            Space for this many number of records is available to
  303. *            place statistics information in.
  304. *
  305. *        RecordCountSupplied
  306. *            Number of statistic records supplied.
  307. *
  308. *
  309. *        struct Sana2DeviceStats
  310. *            {
  311. *            LONG packets_received;
  312. *            LONG packets_sent;
  313. *            LONG framing_errors;
  314. *            LONG bad_data;
  315. *            LONG hard_misses;
  316. *            LONG soft_misses;
  317. *            LONG unknown_types_received;
  318. *            LONG fifo_overruns;
  319. *            LONG fifo_underruns;
  320. *            LONG reconfigurations;
  321. *            struct timeval last_start;
  322. *            };
  323. *
  324. *        packets_received
  325. *            Number of packets that this unit has received.
  326. *
  327. *        packets_sent
  328. *            Number of packets that this unit has sent.
  329. *
  330. *        framing_errors
  331. *            Number of framing errors detected.
  332. *
  333. *        bad_data
  334. *            Number of bad packets received.
  335. *
  336. *        hard_misses
  337. *            Number of packets lost due to insufficient resources
  338. *            available in the network interface.
  339. *
  340. *        soft_misses
  341. *            Number of packets lost due to insifficient resources
  342. *            available on the host.
  343. *
  344. *        unknown_type_received
  345. *            Number of packets received that had no pending read
  346. *            command with the appropriate packet type.
  347. *
  348. *        fifo_overruns
  349. *            Number of overruns encountered when attempting to
  350. *            store received packets.
  351. *
  352. *        fifo_underruns
  353. *            Number of underruns encountered when attempting to
  354. *            send packets.
  355. *
  356. *        reconfigurations
  357. *            Number of network reconfigurations since this unit was
  358. *            last configured.
  359. *
  360. *        last_start
  361. *            The time when this unit last went online.
  362. *
  363. *
  364. *   CONSTANTS
  365. *    OpenDevice flags argument (SANA2OPB_xxx):
  366. *        MINE
  367. *            Exclusive access to the unit requested.
  368. *
  369. *        PROM
  370. *            Promiscuous mode requested.
  371. *
  372. *
  373. *    IOSana2Req S2io_Flags field (SANA2IOB_xxx):
  374. *        RAW
  375. *            Raw packet read/write requested.
  376. *
  377. *        BCAST
  378. *            Broadcast packet (received).
  379. *
  380. *        MCAST
  381. *            Multicast packet (received).
  382. *
  383. *        QUICK
  384. *            Quick IO requested.
  385. *
  386. *
  387. *    IOSana2Req S2io_Error field (S2ERR_xxx):
  388. *        NO_RESOURCES
  389. *            Insufficient resources available.
  390. *
  391. *        UNKNOWN_ENTITY
  392. *            Specified entity unknown or not found.
  393. *
  394. *        BAD_ARGUMENT
  395. *            Noticably bad argument.
  396. *
  397. *        BAD_STATE
  398. *            Command inappropriate for current state.
  399. *
  400. *        BAD_ADDRESS
  401. *            Noticably bad address.
  402. *
  403. *        MTU_EXCEEDED
  404. *            Write data too large.
  405. *
  406. *        BAD_PROTOCOL
  407. *            Noticably bad packet type.
  408. *
  409. *        NOT_SUPPORTED
  410. *            Command is not supported by this driver. This is
  411. *            similar to IOERR_NOCMD as defined in exec/errors.h but
  412. *            S2ERR_NOT_SUPPORTED indicates that the requested
  413. *            command is a valid SANA-II command and that the driver
  414. *            does not support it, e.g. SANA2CMD_MULTICAST.
  415. *
  416. *        SOFTWARE
  417. *            Software error of some kind.
  418. *
  419. *
  420. *    IOSana2Req S2io_WireError field (S2WERR_xxx):
  421. *        NOT_CONFIGURED
  422. *            Command requires unit to be configured.
  423. *
  424. *        UNIT_ONLINE
  425. *            Command requires that the unit be offline.
  426. *
  427. *        UNIT_OFFLINE
  428. *            Command requires that the unit be online.
  429. *
  430. *        ALREADY_TRACKED
  431. *            Protocol is already being tracked.
  432. *
  433. *        NOT_TRACKED
  434. *            Protocol is not being tracked.
  435. *
  436. *        NETBUFF_ERROR
  437. *            NetBuff.library error return caused error.
  438. *
  439. *        SRC_ADDRESS
  440. *            Problem with the source address field.
  441. *
  442. *        DST_ADDRESS
  443. *            Problem with destination address field.
  444. *
  445. *        BAD_BROADCAST
  446. *            Problem with an attempt to broadcast.
  447. *
  448. *        BAD_MULTICAST
  449. *            Problem with an attempt to multicast.
  450. *
  451. *        ALIAS_LIST_FULL
  452. *            Station alias list full.
  453. *
  454. *        BAD_ALIAS
  455. *            Bad or unknown station alias.
  456. *
  457. *        MULTICAST_FULL
  458. *            Multicast address list full.
  459. *
  460. *        BAD_EVENT
  461. *            Event specified is unknown.
  462. *
  463. *        BAD_STATDATA
  464. *            The S2IO_StatData pointer or the data it points to
  465. *            failed a sanity check.
  466. *
  467. *        PROTOCOL_UNKNOWN
  468. *            The protocol specified is unknown or the type of magic
  469. *            used by the request protocol is unknown.
  470. *
  471. *        IS_CONFIGURED
  472. *            Attempt to reconfigure the unit.
  473. *
  474. *        NULL_POINTER
  475. *            A NULL pointer was detected in one of the arguments.
  476. *
  477. *
  478. *    Event types (S2EVENT_xxx):
  479. *        ERROR
  480. *            Return when any error occures.
  481. *
  482. *        TX
  483. *            Return on any transmit error.
  484. *
  485. *        RX
  486. *            Return on any receive error.
  487. *
  488. *        ONLINE
  489. *            Return when unit goes online.
  490. *
  491. *        OFFLINE
  492. *            Return when unit goes offline.
  493. *
  494. *        NETBUFF
  495. *            Return on any NetBuff.library error.
  496. *
  497. *        HARDWARE
  498. *            Return when any hardware error occures.
  499. *
  500. *        SOFTWARE
  501. *            Return when any software error occures.
  502. *
  503. *
  504. *   SEE ALSO
  505. *    NetBuff.library documentation.
  506. *
  507. *    Separate document for each type of network detailing specific
  508. *    device requirements.
  509. *
  510. *
  511. *   CREDITS
  512. *    Raymond S. Brand,   rsbx@cbmvax.commodore.com,  (215) 431-9100
  513. *    Martin Hunt,      martin@cbmvax.commodore.com,  (215) 431-9100
  514. *    Perry Kivolowitz,           ASDG Incorporated,  (608) 273-6585
  515. *
  516. **********************************************************************
  517. *
  518. *   IMPLEMENTATION NOTES
  519. *
  520.  
  521.  
  522. *****i* sana2.device/Init() ******************************************
  523. *
  524. *   NAME
  525. *    Init -- Initialize the device from nothing.
  526. *
  527. *   SYNOPSIS
  528. *    Init( SegList )
  529. *          A0
  530. *
  531. *    void Init( void * );
  532. *
  533. *   FUNCTION
  534. *    This routine initializes the device from nothing.
  535. *
  536. *   INPUTS
  537. *    SegList         Pointer to the SegList for the device code.
  538. *
  539. *   NOTES
  540. *
  541. *   SEE ALSO
  542. *
  543. *   BUGS
  544. *
  545. **********************************************************************
  546. *
  547. *   IMPLEMENTATION NOTES
  548. *
  549. *
  550. *   REGISTER USAGE
  551. *
  552. * A0 --    seglist    ?????    ?????
  553. * A6 --    exec    ?????    exec
  554. *
  555.  
  556.  
  557. *****i* sana2.device/Open() ******************************************
  558. *
  559. *   NAME
  560. *    Open -- Request an opening of the network device.
  561. *
  562. *   SYNOPSIS
  563. *    error = Open( unit, Sana2Req, flags )
  564. *    D0            D0    A1        D1  
  565. *
  566. *    BYTE Open( ULONG, struct IOSana2Req *, ULONG );
  567. *
  568. *   FUNCTION
  569. *    This function is called by exec.library OpenDevice().
  570. *
  571. *    This function performs whatever initialization is required per
  572. *    device open and initializes the Sana2Req for use by the
  573. *    device.
  574. *
  575. *   INPUTS
  576. *    unit            Device unit to open.
  577. *    Sana2Req        Pointer to IOSana2Req structure to be
  578. *                        initialized by the sana2.device.
  579. *    flags           Supported flags are:
  580. *                        SANA2OPB_MINE
  581. *                        SANA2OPB_PROM
  582. *
  583. *   RESULTS
  584. *    error           same as io_Error
  585. *    io_Error        Zero if successful; non-zero otherwise.
  586. *    io_Device       A pointer to whatever device will handle the
  587. *                        calls for this unit.  This pointer may be
  588. *                        different depending on what unit is
  589. *                        requested.
  590. *
  591. *   NOTES
  592. *
  593. *   SEE ALSO
  594. *    exec.library/OpenDevice(),
  595. *    exec.library/CloseDevice()
  596. *
  597. *   BUGS
  598. *
  599. **********************************************************************
  600. *
  601. *   IMPLEMENTATION NOTES
  602. *
  603. *    The system is single threaded while executing this function.
  604. *
  605. *
  606. *   REGISTER USAGE
  607. *
  608. * D0 --    unit    ?????    ?????
  609. * D1 --    flags    ?????    ?????
  610. * A1 -- IOReq    ?????    ?????
  611. * A6 --    device    ?????    device
  612. *
  613.  
  614.  
  615. *****i* sana2.device/Close() *****************************************
  616. *
  617. *   NAME
  618. *    CloseDevice -- Close the device.
  619. *
  620. *   SYNOPSIS
  621. *    Close( Sana2Req )
  622. *           A1
  623. *
  624. *    void Close( struct IOSana2Req * );
  625. *
  626. *   FUNCTION
  627. *    This function is called by exec.library CloseDevice().
  628. *
  629. *    This function performs whatever cleanup is required at device
  630. *    closes.
  631. *
  632. *    Note that all IORequests MUST be complete before closing. If
  633. *    any are pending, your program must AbortIO() then WaitIO()
  634. *    each outstanding IORequest to complete them.
  635. *
  636. *   INPUTS
  637. *    Sana2Req        Pointer to Sana2Req initialized by Open().
  638. *
  639. *   NOTES
  640. *
  641. *   SEE ALSO
  642. *    exec.library/CloseDevice(),
  643. *    exec.library/OpenDevice()
  644. *
  645. *   BUGS
  646. *
  647. **********************************************************************
  648. *
  649. *   IMPLEMENTATION NOTES
  650. *
  651. *
  652. *   REGISTER USAGE
  653. *
  654. * D0 --    ?????    ?????    SegList
  655. * A1 -- IOReq    ?????    ?????
  656. * A6 --    device    ?????    device
  657. *
  658.  
  659.  
  660. *****i* sana2.device/BeginIO() ***************************************
  661. *
  662. *   NAME
  663. *    BeginIO -- Start an IO operation.
  664. *
  665. *   SYNOPSIS
  666. *    BeginIO( Sana2Req )
  667. *             A1
  668. *
  669. *    void BeginIO( struct IOSana2Req * );
  670. *
  671. *   FUNCTION
  672. *    This is a direct function call to the device. It is intended
  673. *    for more advanced programmers. See exec's DoIO() and SendIO()
  674. *    for the normal method of calling devices.
  675. *
  676. *    This function initiates a I/O request made to a sana2.device.
  677. *
  678. *   INPUTS
  679. *    Sana2Req        Pointer to an initialized IOSana2Req
  680. *                        structure.
  681. *    S2io_Message    A mn_ReplyPort is required.
  682. *    S2io_Device     Set by Open().
  683. *    S2io_Unit       Set by Open().
  684. *    S2io_Command    Needs to be set to proper command
  685. *    S2io_Flags      If the IOB_QUICK bit is set the device will
  686. *                        attempt to finish command without
  687. *                        'Replying' through the exec message
  688. *                        system. The IOB_QUICK bit will be cleared
  689. *                        if the request will 'Replied' when
  690. *                        complete.
  691. *    S2io_PacketType Pointer to the Sana2PacketType structure for
  692. *                        the packet type of interest.
  693. *    S2io_SrcAddr    Source interface address of the packet.
  694. *    S2io_DstAddr    Destination interface address of the packet.
  695. *    S2io_Body       Contents depend on particular command.
  696. *    S2io_StatData   Pointer to area to store statistics data.
  697. *
  698. *   RESULTS
  699. *    S2io_Error      Zero if successful; non-zero otherwise.
  700. *    S2io_WireError  More specific error number.
  701. *    S2io_SrcAddr    Source interface address of the packet.
  702. *    S2io_DstAddr    Destination interface address of the packet.
  703. *    S2io_Body       Contents depend on particular command.
  704. *
  705. *   NOTES
  706. *
  707. *   SEE ALSO
  708. *    exec.library/DoIO(),
  709. *    exec.library/SendIO()
  710. *
  711. *   BUGS
  712. *
  713. **********************************************************************
  714. *
  715. *   IMPLEMENTATION NOTES
  716. *
  717. *
  718. *   REGISTER USAGE
  719. *
  720. * A1 -- IOReq    ?????    ?????
  721. * A6 --    device    ?????    device
  722. *
  723.  
  724.  
  725. ******* sana2.device/AbortIO() ***************************************
  726. *
  727. *   NAME
  728. *    AbortIO -- Remove an existing device request.
  729. *
  730. *   SYNOPSIS
  731. *    error = AbortIO( Sana2Req )
  732. *    D0               A1
  733. *
  734. *    LONG AbortIO( struct IOSana2Req * );
  735. *
  736. *   FUNCTION
  737. *    This is an exec.library call.
  738. *
  739. *    This function aborts an ioRequest. If the request is active,
  740. *    it may or may not be aborted. If the request is queued it is
  741. *    removed. The request will be returned in the same way as if
  742. *    it had normally completed.
  743. *
  744. *   INPUTS
  745. *    Sana2Req        Sana2Req to be aborted.
  746. *
  747. *   RESULTS
  748. *    error           Zero if the request was aborted, non-zero
  749. *                        otherwise. S2io_Error in Sana2Req will be
  750. *                        set to IOERR_ABORTED (-2) if it was
  751. *                        aborted.
  752. *
  753. *   NOTES
  754. *
  755. *   SEE ALSO
  756. *    exec.library/AbortIO()
  757. *
  758. *   BUGS
  759. *
  760. **********************************************************************
  761. *
  762. *   IMPLEMENTATION NOTES
  763. *
  764. *
  765. *   REGISTER USAGE
  766. *
  767. * D0 --    ?????    ?????    error
  768. * A1 -- IOReq    ?????    ?????
  769. * A6 --    device    ?????    device
  770. *
  771.  
  772.  
  773. *****i* sana2.device/Expunge() ***************************************
  774. *
  775. *   NAME
  776. *    Expunge -- Free device resources and dependencies.
  777. *
  778. *   SYNOPSIS
  779. *    Expunge( )
  780. *
  781. *    void Expunge( void );
  782. *
  783. *   FUNCTION
  784. *    This function deallocates all memory and other resources
  785. *    associated with the device, if possible.
  786. *
  787. *   NOTES
  788. *    This function is not permitted to wait.
  789. *
  790. *   SEE ALSO
  791. *
  792. *   BUGS
  793. *
  794. **********************************************************************
  795. *
  796. *   IMPLEMENTATION NOTES
  797. *
  798. *
  799. *   REGISTER USAGE
  800. *
  801. * D0 --    ?????    ?????    SegList
  802. * A6 --    device    ?????    device
  803. *
  804.  
  805.  
  806. ******* sana2.device/CMD_READ ****************************************
  807. *
  808. *   NAME
  809. *    Read -- Get a packet from the network.
  810. *
  811. *   FUNCTION
  812. *    Get the next packet available of the requested packet type.
  813. *    The data returned in the S2io_Body NetBuff is normally the
  814. *    Data Link Layer packet data only. If bit SANA2IOB_RAW is set
  815. *    in S2io_Flags, then the entire Data Link Layer packet,
  816. *    including both header and trailer information, will be
  817. *    returned.
  818. *
  819. *   IO REQUEST
  820. *    S2io_Command    CMD_READ
  821. *    S2io_Flags      Supported flags are:
  822. *                        SANA2IOB_RAW
  823. *                        SANA2IOB_QUICK
  824. *    S2io_PacketType Pointer to packet type desired.
  825. *    S2io_Body       NetBuff to hold packet data.
  826. *
  827. *   RESULTS
  828. *    S2io_Error      Zero if successful; non-zero otherwise.
  829. *    S2io_WireError  More specific error number.
  830. *    S2io_Flags      The following flags may be returned:
  831. *                        SANA2IOB_RAW
  832. *                        SANA2IOB_BCAST
  833. *                        SANA2IOB_MCAST
  834. *    S2io_SrcAddr    Source interface address of packet.
  835. *    S2io_DstAddr    Destination interface address of packet.
  836. *    S2io_DTLLength  Length of packet data as given by the Data
  837. *                        Link Layer protocol.
  838. *    S2io_Body       NetBuff with packet data.
  839. *
  840. *   NOTES
  841. *    Only the first NetBuffSegment in the NetBuff passed is
  842. *    guaranteed to be returned.
  843. *
  844. *   SEE ALSO
  845. *    sana2.device/SANA2CMD_READORPHAN,
  846. *    sana2.device/CMD_WRITE
  847. *
  848. *   BUGS
  849. *
  850. **********************************************************************
  851. *
  852. *   IMPLEMENTATION NOTES
  853. *
  854.  
  855.  
  856. ******* sana2.device/CMD_WRITE ***************************************
  857. *
  858. *   NAME
  859. *    Write -- Send packet to the network.
  860. *
  861. *   FUNCTION
  862. *    This command causes the packet to be sent to the specified
  863. *    network interface. Normally, appropriate packet header and
  864. *    trailer information will be added to the packet data when it
  865. *    is sent. If bit SANA2IOB_RAW is set in io-Flags, then the
  866. *    S2io_Body NetBuff is assumed to contain an entire Data Link
  867. *    Layer packet and will be sent unmodified.
  868. *
  869. *    The data in the S2io_Body NetBuff is returned unmodified; but,
  870. *    the distribution of the data in, and the number of
  871. *    NetBuffSegments, the S2io_Body NetBuff may be modified.
  872. *
  873. *   IO REQUEST
  874. *    S2io_Command    CMD_WRITE
  875. *    S2io_Flags      Supported flags are:
  876. *                        SANA2IOB_RAW
  877. *                        SANA2IOB_QUICK
  878. *    S2io_PacketType Pointer to type of packet to send.
  879. *    S2io_DstAddr    Destination interface address for this packet.
  880. *    S2io_Body       NetBuff with packet data.
  881. *
  882. *   RESULTS
  883. *    S2io_Error      Zero if successful; non-zero otherwise.
  884. *    S2io_WireError  More specific error number.
  885. *
  886. *   NOTES
  887. *
  888. *   SEE ALSO
  889. *    sana2.device/CMD_READ,
  890. *    sana2.device/SANA2CMD_BROADCAST,
  891. *    sana2.device/SANA2CMD_MULTICAST
  892. *
  893. *   BUGS
  894. *
  895. **********************************************************************
  896. *
  897. *   IMPLEMENTATION NOTES
  898. *
  899.  
  900.  
  901. ******* sana2.device/SANA2CMD_READORPHAN *****************************
  902. *
  903. *   NAME
  904. *    ReadOrphan -- Get a packet for which there is no reader.
  905. *
  906. *   FUNCTION
  907. *    Get the next packet available that does not satisfy any
  908. *    then-pending CMD_READ requests. The data returned in the
  909. *    S2io_Body NetBuff is normally the Data Link Layer packet type
  910. *    field and the packet data. If bit SANA2IOB_RAW is set in
  911. *    S2io_Flags, then the entire Data Link Layer packet, including
  912. *    both header and trailer information, will be returned.
  913. *
  914. *   IO REQUEST
  915. *    S2io_Command    CMD_READORPHAN
  916. *    S2io_Flags      Supported flags are:
  917. *                        SANA2IOB_RAW
  918. *                        SANA2IOB_QUICK
  919. *    S2io_Body       NetBuff to hold packet data.
  920. *
  921. *   RESULTS
  922. *    S2io_Error      Zero if successful; non-zero otherwise.
  923. *    S2io_WireError  More specific error number.
  924. *    S2io_Flags      The following flags may be returned:
  925. *                        SANA2IOB_RAW
  926. *                        SANA2IOB_BCAST
  927. *                        SANA2IOB_MCAST
  928. *    S2io_SrcAddr    Source interface address of packet.
  929. *    S2io_DstAddr    Destination interface address of packet.
  930. *    S2io_DTLLength  Lenght of packet data as given by the Data
  931. *                        Link Layer protocol.
  932. *    S2io_Body       NetBuff with packet data.
  933. *
  934. *   NOTES
  935. *    Only the first NetBuffSegment in the NetBuff passed in is
  936. *    guarenteed to be returned.
  937. *
  938. *    To determine which protocol family the returned packet belongs
  939. *    to you may have to specify SANA2IOB_RAW to get the entire data
  940. *    link layer wrapper (which is where the protocol type may be
  941. *    kept). Notice this necessarily means that this cannot be done
  942. *    in a network interface independent fashion.
  943. *
  944. *   SEE ALSO
  945. *    sana2.device/CMD_READ,
  946. *    sana2.device/CMD_WRITE
  947. *
  948. *   BUGS
  949. *
  950. **********************************************************************
  951. *
  952. *   IMPLEMENTATION NOTES
  953. *
  954.  
  955.  
  956. ******* sana2.device/SANA2CMD_DEVICEQUERY ****************************
  957. *
  958. *   NAME
  959. *    DeviceQuery -- Return parameters for this network interface.
  960. *
  961. *   FUNCTION
  962. *    This command causes the device driver to report information
  963. *    about the device. Up to DevQuerySizeAvailable bytes of the
  964. *    information is copied into a buffer pointed to by
  965. *    S2io_StatData. The format of the data is as follows:
  966. *
  967. *        struct Sana2DeviceQuery
  968. *            {
  969. *            /*
  970. *             * Standard information
  971. *             */
  972. *            ULONG DevQuerySizeAvailble; /* bytes available */
  973. *            ULONG DevQuerySizeSupplied; /* bytes supplied */
  974. *            LONG  DevQueryFormat;   /* this is type 0 */
  975. *            LONG  DeviceLevel;      /* this document is level 0 */
  976. *
  977. *            /*
  978. *             * Common information
  979. *             */
  980. *            UWORD AddrFieldSize;    /* address size in bits */
  981. *            ULONG MTU;              /* maximum packet data size */
  982. *            LONG  bps;              /* line rate (bits/sec) */
  983. *            LONG  HardwareType;     /* what the wire is */
  984. *
  985. *            /*
  986. *             * Format specific information
  987. *             */
  988. *            };
  989. *
  990. *    The DeviceQueryAvailable specifies the number of bytes that
  991. *    the caller is prepared to accomodate, including the standard
  992. *    information fields.
  993. *
  994. *    DevQuerySizeSupplied is the number of bytes actually supplied,
  995. *    including the standard information fields, which will not
  996. *    exceed DevQuerySizeAvailable.
  997. *
  998. *    The values used to identify the type of physical hardware are
  999. *    the same values used in the hardware type field (hdr) of
  1000. *    Address Resolution Protocol (ARP) packets as defined by
  1001. *    RFC-826 (ARP) and RFC-1060 (Assigned Numbers, March 1990).
  1002. *
  1003. *    The following are defined in RFC-1060.
  1004. *
  1005. *        Hardware Type (hrd)
  1006. *
  1007. *            Type   Description
  1008. *            ----   -----------
  1009. *              1    Ethernet (10Mb)
  1010. *              2    Experimental Ethernet (3Mb)
  1011. *              3    Amateur Radio AX.25
  1012. *              4    Proteon ProNET Token Ring
  1013. *              5    Chaos
  1014. *              6    IEEE 802 Networks
  1015. *              7    ARCNET
  1016. *              8    Hyperchannel
  1017. *              9    Lanstar
  1018. *             10    Autonet Short Address
  1019. *             11    LocalTalk
  1020. *             12    LocalNet (IBM PCNet or SYTEK LocalNET)
  1021. *
  1022. *   IO REQUEST
  1023. *    S2io_Command    SANA2CMD_DEVICEQUERY
  1024. *    S2io_StatData   Pointer to Sana2DeviceQuery structure to fill
  1025. *                        in.
  1026. *
  1027. *   RESULTS
  1028. *    S2io_Error      Zero if successful; non-zero otherwise.
  1029. *    S2io_WireError  More specific error number.
  1030. *
  1031. *   NOTES
  1032. *
  1033. *   SEE ALSO
  1034. *
  1035. *   BUGS
  1036. *
  1037. **********************************************************************
  1038. *
  1039. *   IMPLEMENTATION NOTES
  1040. *
  1041.  
  1042.  
  1043. ******* sana2.device/SANA2CMD_GETSTATIONADDRESS **********************
  1044. *
  1045. *   NAME
  1046. *    GetStationAddress -- Get default and interface address.
  1047. *
  1048. *   FUNCTION
  1049. *    This command causes the device driver to copy the current
  1050. *    interface address into S2io_SrcAddr, and to copy the factory
  1051. *    default station address into S2io_DstAddr.
  1052. *
  1053. *   IO REQUEST
  1054. *    S2io_Command    SANA2CMD_GETSTATIONADDRESS
  1055. *
  1056. *   RESULTS
  1057. *    S2io_Error      Zero if successful; non-zero otherwise.
  1058. *    S2io_WireError  More specific error number.
  1059. *    S2io_SrcAddr    Default interface address.
  1060. *    S2io_DstAddr    Current interface address.
  1061. *
  1062. *   NOTES
  1063. *
  1064. *   SEE ALSO
  1065. *    sana2.device/SANA2CMD_CONFIGINTERFACE
  1066. *
  1067. *   BUGS
  1068. *
  1069. **********************************************************************
  1070. *
  1071. *   IMPLEMENTATION NOTES
  1072. *
  1073.  
  1074.  
  1075. ******* sana2.device/SANA2CMD_CONFIGINTERFACE ************************
  1076. *
  1077. *   NAME
  1078. *    ConfigInterface -- Configure the network interface.
  1079. *
  1080. *   FUNCTION
  1081. *    This command causes the device driver to initialize the
  1082. *    interface hardware and to set the network interface address to
  1083. *    the address in S2io_SrcAddr. This command can only be executed
  1084. *    once and, if successful, will leave the driver and network
  1085. *    interface fully operational and the network interface in
  1086. *    S2io_SrcAddr.
  1087. *
  1088. *    To set the interface address to the factory address, the
  1089. *    network management software must use GetStationAddress first
  1090. *    and then call ConfigInterface with the result. If there is no
  1091. *    factory address then the network software must pick an address
  1092. *    to use.
  1093. *
  1094. *    Until this command is executed the device will not listen for
  1095. *    any packets on the hardware.
  1096. *
  1097. *   IO REQUEST
  1098. *    S2io_Command    SANA2CMD_CONFIGINTERFACE
  1099. *    S2io_Flags      Supported flags are:
  1100. *                        SANA2IOB_QUICK
  1101. *    S2io_SrcAddr    Address for this interface.
  1102. *
  1103. *   RESULTS
  1104. *    S2io_Error      Zero if successful; non-zero otherwise.
  1105. *    S2io_WireError  More specific error number.
  1106. *    S2io_SrcAddr    Address of this interface as configured.
  1107. *
  1108. *   NOTES
  1109. *    Some networks have the interfaces choose a currently unused
  1110. *    interface address each time the interface is initialized. The
  1111. *    caller must check S2io_SrcAddr for the actual interface
  1112. *    address after configuring the interface.
  1113. *
  1114. *   SEE ALSO
  1115. *    sana2.device/SANA2CMD_GETSTATIONADDRESS
  1116. *
  1117. *   BUGS
  1118. *    What to do when/if the network interface address changes due
  1119. *    to a network reconfiguration.
  1120. *
  1121. **********************************************************************
  1122. *
  1123. *   IMPLEMENTATION NOTES
  1124. *
  1125.  
  1126.  
  1127. ******* sana2.device/SANA2CMD_ADDSTATIONALIAS ************************
  1128. *
  1129. *   NAME
  1130. *    AddStationAlias -- Add interface address alias.
  1131. *
  1132. *   FUNCTION
  1133. *    This function adds another network interface address to which
  1134. *    the network interface should respond.
  1135. *
  1136. *   IO REQUEST
  1137. *    S2io_Command    SANA2CMD_ADDSTATIONALIAS
  1138. *    S2io_SrcAddr    Alias to add.
  1139. *
  1140. *   RESULTS
  1141. *    S2io_Error      Zero if successful; non-zero otherwise.
  1142. *    S2io_WireError  More specific error number.
  1143. *
  1144. *   NOTES
  1145. *    Since alias interface addresses are not bound to a particular
  1146. *    packet type or read request, each added interface alias
  1147. *    address has an "added" count associated with it.
  1148. *
  1149. *   SEE ALSO
  1150. *    sana2.device/SANA2CMD_DELSTATIONALIAS
  1151. *
  1152. *   BUGS
  1153. *
  1154. **********************************************************************
  1155. *
  1156. *   IMPLEMENTATION NOTES
  1157. *
  1158.  
  1159.  
  1160. ******* sana2.device/SANA2CMD_DELSTATIONALIAS ************************
  1161. *
  1162. *   NAME
  1163. *    DelStationAlias -- Delete a interface address alias.
  1164. *
  1165. *   FUNCTION
  1166. *    This function deletes a network interface address from the
  1167. *    list of addresses to which this interface should respond.
  1168. *
  1169. *   IO REQUEST
  1170. *    S2io_Command    SANA2CMD_DELSTATIONALIAS
  1171. *    S2io_SrcAddr    Alias to delete.
  1172. *
  1173. *   RESULTS
  1174. *    S2io_Error      Zero if successful; non-zero otherwise.
  1175. *    S2io_WireError  More specific error number.
  1176. *
  1177. *   NOTES
  1178. *    Since alias interface addresses are not bound to a particular
  1179. *    packet type or read request, each added interface alias
  1180. *    address has an "added" count associated with it.
  1181. *
  1182. *   SEE ALSO
  1183. *    sana2.device/SANA2CMD_ADDSTATIONALIAS
  1184. *
  1185. *   BUGS
  1186. *
  1187. **********************************************************************
  1188. *
  1189. *   IMPLEMENTATION NOTES
  1190. *
  1191.  
  1192.  
  1193. ******* sana2.device/SANA2CMD_ADDMULTICASTADDRESS ********************
  1194. *
  1195. *   NAME
  1196. *    AddMulticastAddress -- Enable an interface multicast address.
  1197. *
  1198. *   FUNCTION
  1199. *    This command causes the device driver to enable multicast
  1200. *    packet reception for the requested address.
  1201. *
  1202. *   IO REQUEST
  1203. *    S2io_Command    SANA2CMD_ADDMULTICASTADDRESS
  1204. *    S2io_SrcAddr    Multicast address to enable.
  1205. *
  1206. *   RESULTS
  1207. *    S2io_Error      Zero if successful; non-zero otherwise.
  1208. *    S2io_WireError  More specific error number.
  1209. *
  1210. *   NOTES
  1211. *    Since multicast addresses are not "bound" to a particular
  1212. *    packet type, each enabled multicast address has an "enabled"
  1213. *    count associated with it.
  1214. *
  1215. *   SEE ALSO
  1216. *    sana2.device/SANA2CMD_DELMULTICASTADDRESS
  1217. *
  1218. *   BUGS
  1219. *
  1220. **********************************************************************
  1221. *
  1222. *   IMPLEMENTATION NOTES
  1223. *
  1224.  
  1225.  
  1226. ******* sana2.device/SANA2CMD_DELMULTICASTADDRESS ********************
  1227. *
  1228. *   NAME
  1229. *    DelMultiCastAddress -- Disable an interface multicast address.
  1230. *
  1231. *   FUNCTION
  1232. *    This command causes device driver to disable multicast packet
  1233. *    reception for the requested address.
  1234. *
  1235. *    It is an error to disable a multicast address that is not
  1236. *    enabled.
  1237. *
  1238. *   IO REQUEST
  1239. *    S2io_Command    SANA2CMD_DELMULTICASTADDRESS
  1240. *    S2io_SrcAddr    Multicast address to disable.
  1241. *
  1242. *   RESULTS
  1243. *    S2io_Error      Zero if successful; non-zero otherwise.
  1244. *    S2io_WireError  More specific error number.
  1245. *
  1246. *   NOTES
  1247. *    Since multicast addresses are not "bound" to a particular
  1248. *    packet type, each enabled multicast address has an "enabled"
  1249. *    count associated with it.
  1250. *
  1251. *   SEE ALSO
  1252. *    sana2.device/SANA2CMD_ADDMULTICASTADDRESS
  1253. *
  1254. *   BUGS
  1255. *
  1256. **********************************************************************
  1257. *
  1258. *   IMPLEMENTATION NOTES
  1259. *
  1260.  
  1261.  
  1262. ******* sana2.device/SANA2CMD_MULTICAST ******************************
  1263. *
  1264. *   NAME
  1265. *    Multicast -- Multicast a packet on network.
  1266. *
  1267. *   FUNCTION
  1268. *    This command works the same as CMD_WRITE except that it also
  1269. *    performs whatever special processing of the packet is required
  1270. *    to do a multicast send. The actual multicast mechanism is
  1271. *    neccessarily network/interface/device specific.
  1272. *
  1273. *   IO REQUEST
  1274. *    S2io_Command    SANA2CMD_MULTICAST
  1275. *    S2io_Flags      Supported flags are:
  1276. *                        SANA2IOB_RAW
  1277. *                        SANA2IOB_QUICK
  1278. *    S2io_PacketType Pointer to type of packet to send.
  1279. *    S2io_DstAddr    Destination interface address for this packet.
  1280. *    S2io_Body       NetBuff with packet data.
  1281. *
  1282. *   RESULTS
  1283. *    S2io_Error      Zero if successful; non-zero otherwise.
  1284. *                        This command can fail for many reasons and
  1285. *                        is not supported by all networks and/or
  1286. *                        network interfaces.
  1287. *    S2io_WireError  More specific error number.
  1288. *
  1289. *   NOTES
  1290. *    The address supplied in S2io_DstAddr will be sanity checked
  1291. *    (if possible) by the driver. If the supplied address fails
  1292. *    this sanity check, the multicast request will fail
  1293. *    immediately.
  1294. *
  1295. *   SEE ALSO
  1296. *    sana2.device/CMD_WRITE,
  1297. *    sana2.device/SANA2CMD_BROADCAST
  1298. *
  1299. *   BUGS
  1300. *
  1301. **********************************************************************
  1302. *
  1303. *   IMPLEMENTATION NOTES
  1304. *
  1305.  
  1306.  
  1307. ******* sana2.device/SANA2CMD_BROADCAST ******************************
  1308. *
  1309. *   NAME
  1310. *    Broadcast -- Broadcast a packet on network.
  1311. *
  1312. *   FUNCTION
  1313. *    This command works the same as CMD_WRITE except that it also
  1314. *    performs whatever special processing of the packet is required
  1315. *    to do a broadcast send. The actual broadcast mechanism is
  1316. *    neccessarily network/interface/device specific.
  1317. *
  1318. *   IO REQUEST
  1319. *    S2io_Command    SANA2CMD_BROADCAST
  1320. *    S2io_Flags      Supported flags are:
  1321. *                        SANA2IOB_RAW
  1322. *                        SANA2IOB_QUICK
  1323. *    S2io_PacketType Pointer to type of packet to send.
  1324. *    S2io_Body       NetBuff with packet data.
  1325. *
  1326. *   RESULTS
  1327. *    S2io_DstAddr    The contents of this field are to be
  1328. *                        considered trash upon return of the IOReq.
  1329. *    S2io_Error      Zero if successful; non-zero otherwise.
  1330. *                        This command can fail for many reasons and
  1331. *                        is not supported by all networks and/or
  1332. *                        network interfaces.
  1333. *    S2io_WireError  More specific error number.
  1334. *
  1335. *   NOTES
  1336. *
  1337. *   SEE ALSO
  1338. *    sana2.device/CMD_WRITE,
  1339. *    sana2.device/SANA2CMD_MULTICAST
  1340. *
  1341. *   BUGS
  1342. *
  1343. **********************************************************************
  1344. *
  1345. *   IMPLEMENTATION NOTES
  1346. *
  1347.  
  1348.  
  1349. ******* sana2.device/SANA2CMD_TRACKTYPE ******************************
  1350. *
  1351. *   NAME
  1352. *    TrackType -- Accumulate statistics about a packet type.
  1353. *
  1354. *   FUNCTION
  1355. *    This command causes the device driver to accumulate statistics
  1356. *    about a particular packet type. Packet type statistics, for
  1357. *    the particular packet type, are zeroed by this command.
  1358. *
  1359. *   IO REQUEST
  1360. *    S2io_Command    SANA2CMD_TRACKTYPE
  1361. *    S2io_PacketType Pointer to the packet type of interest.
  1362. *
  1363. *   RESULTS
  1364. *    S2io_Error      Zero if successful; non-zero otherwise.
  1365. *    S2io_WireError  More specific error number.
  1366. *
  1367. *   NOTES
  1368. *
  1369. *   SEE ALSO
  1370. *    sana2.device/SANA2CMD_UNTRACKTYPE,
  1371. *    sana2.device/SANA2CMD_GETTYPESTATS
  1372. *
  1373. *   BUGS
  1374. *
  1375. **********************************************************************
  1376. *
  1377. *   IMPLEMENTATION NOTES
  1378. *
  1379.  
  1380.  
  1381. ******* sana2.device/SANA2CMD_UNTRACKTYPE ****************************
  1382. *
  1383. *   NAME
  1384. *    UntrackType -- End statistics about a packet type.
  1385. *
  1386. *   FUNCTION
  1387. *    This command causes the device driver to stop accumulating
  1388. *    statistics about a particular packet type.
  1389. *
  1390. *   IO REQUEST
  1391. *    S2io_Command    SANA2CMD_UNTRACKTYPE
  1392. *    S2io_PacketType Pointer to the packet type of interest.
  1393. *
  1394. *   RESULTS
  1395. *    S2io_Error      Zero if successful; non-zero otherwise.
  1396. *    S2io_WireError  More specific error number.
  1397. *
  1398. *   NOTES
  1399. *
  1400. *   SEE ALSO
  1401. *    sana2.device/SANA2CMD_TRACKTYPE,
  1402. *    sana2.device/SANA2CMD_GETTYPESTATS
  1403. *
  1404. *   BUGS
  1405. *
  1406. **********************************************************************
  1407. *
  1408. *   IMPLEMENTATION NOTES
  1409. *
  1410.  
  1411.  
  1412. ******* sana2.device/SANA2CMD_GETTYPESTATS ***************************
  1413. *
  1414. *   NAME
  1415. *    GetTypeStats -- Get accumulated type specific statistics.
  1416. *
  1417. *   FUNCTION
  1418. *    This command causes the device driver to retrieve various
  1419. *    packet type specific runtime statistics for this network
  1420. *    interface. The format of the data returned is as follows:
  1421. *
  1422. *        struct Sana2TypeStatData
  1423. *            {
  1424. *            LONG PacketsSent;
  1425. *            LONG PacketsReceived;
  1426. *            LONG BytesSent;
  1427. *            LONG BytesReceived;
  1428. *            LONG PacketsDropped;
  1429. *            };
  1430. *
  1431. *   IO REQUEST
  1432. *    S2io_Command    SANA2CMD_GETTYPESTATS
  1433. *    S2io_PacketType Pointer to the packet type of interest.
  1434. *    S2io_StatData   Pointer to TypeStatData structure to fill in.
  1435. *
  1436. *   RESULTS
  1437. *    S2io_Error      Zero if successful; non-zero otherwise.
  1438. *    S2io_WireError  More specific error number.
  1439. *
  1440. *   NOTES
  1441. *    Statistics for a particular packet type are only available
  1442. *    while that packet type is being ``tracked''.
  1443. *
  1444. *   SEE ALSO
  1445. *    sana2.device/SANA2CMD_TRACKTYPE,
  1446. *    sana2.device/SANA2CMD_UNTRACKTYPE
  1447. *
  1448. *   BUGS
  1449. *
  1450. **********************************************************************
  1451. *
  1452. *   IMPLEMENTATION NOTES
  1453. *
  1454.  
  1455.  
  1456. ******* sana2.device/SANA2CMD_GETSPECIALSTATS ************************
  1457. *
  1458. *   NAME
  1459. *    GetSpecialStats -- Get network type specific statistics.
  1460. *
  1461. *   FUNCTION
  1462. *    This function returns statistics which are specific to the
  1463. *    type of network medium this driver controls. For example, this
  1464. *    command could return statistics common to all Ethernets which
  1465. *    are not common to all network mediums in general.
  1466. *
  1467. *    The supplied Sana2SpecialStatData structure is given below:
  1468. *
  1469. *        struct Sana2SpecialStatData
  1470. *            {
  1471. *            ULONG RecordCountMax;
  1472. *            ULONG RecordCountSupplied;
  1473. *            struct Sana2StatRecord[RecordCountMax];
  1474. *            };
  1475. *
  1476. *    The format of the data returned is:
  1477. *
  1478. *        struct Sana2StatRecord
  1479. *            {
  1480. *            ULONG Type;     /* commodore registered */
  1481. *            LONG Count;     /* the stat itself */
  1482. *            char *String;   /* null terminated */
  1483. *            };
  1484. *
  1485. *    The RecordCountMax field specifies the number of records that
  1486. *    the caller is prepared to accomodate.
  1487. *
  1488. *    RecordCountSupplied is the number of record actually supplied
  1489. *    which will not exceed RecordCountMax.
  1490. *
  1491. *   IO REQUEST
  1492. *    S2io_Command    SANA2CMD_GETSPECIALSTATS
  1493. *    S2io_StatData   Pointer to a Sana2SpecialStatData structure to
  1494. *                        fill. RecordCountMax must be initialized.
  1495. *
  1496. *   RESULTS
  1497. *    S2io_Error      Zero if successful; non-zero otherwise.
  1498. *    S2io_WireError  More specific error number.
  1499. *
  1500. *   NOTES
  1501. *    Commodore shall maintain registered statistic Types.
  1502. *
  1503. *   SEE ALSO
  1504. *    sana2.device/SANA2CMD_GETGLOBALSTATS
  1505. *
  1506. *   BUGS
  1507. *
  1508. **********************************************************************
  1509. *
  1510. *   IMPLEMENTATION NOTES
  1511. *
  1512.  
  1513.  
  1514. ******* sana2.device/SANA2CMD_GETGLOBALSTATS *************************
  1515. *
  1516. *   NAME
  1517. *    GetGlobalStats -- Get interface accumulated statistics.
  1518. *
  1519. *   FUNCTION
  1520. *    This command causes the device driver to retrieve various
  1521. *    global runtime statistics for this network interface. The
  1522. *    format of the data returned is as follows:
  1523. *
  1524. *        struct Sana2DeviceStats
  1525. *            {
  1526. *            LONG packets_received;
  1527. *            LONG packets_sent;
  1528. *            LONG framming_errors;
  1529. *            LONG bad_data;
  1530. *            LONG bytes_received;
  1531. *            LONG bytes_sent;
  1532. *            LONG hard_misses;
  1533. *            LONG soft_misses;
  1534. *            LONG unknown_types_received;
  1535. *            LONG fifo_overruns;
  1536. *            LONG fifo_underruns;
  1537. *            LONG reconfigurations;
  1538. *            timeval last_start;
  1539. *            };
  1540. *
  1541. *   IO REQUEST
  1542. *    S2io_Command    SANA2CMD_GETGLOBALSTATS
  1543. *    S2io_StatData   Pointer to Sana2DeviceStats structure to fill.
  1544. *
  1545. *   RESULTS
  1546. *    S2io_Error      Zero if successful; non-zero otherwise.
  1547. *    S2io_WireError  More specific error number.
  1548. *
  1549. *   NOTES
  1550. *
  1551. *   SEE ALSO
  1552. *    sana2.device/SANA2CMD_GETSPECIALSTATS
  1553. *
  1554. *   BUGS
  1555. *
  1556. **********************************************************************
  1557. *
  1558. *   IMPLEMENTATION NOTES
  1559. *
  1560.  
  1561.  
  1562. ******* sana2.device/SANA2CMD_ONEVENT ********************************
  1563. *
  1564. *   NAME
  1565. *    OnEvent -- Return when specified event occures.
  1566. *
  1567. *   FUNCTION
  1568. *    This command returns when a particular event condition has
  1569. *    occured on the network or this network interface.
  1570. *
  1571. *   IO REQUEST
  1572. *    S2io_Command    SANA2CMD_ONEVENT
  1573. *    S2io_Flags      Supported flags are:
  1574. *                        SANA2IOB_QUICK
  1575. *    S2io_WireError  Event number to wait for.
  1576. *
  1577. *   RESULTS
  1578. *    S2io_Error      Zero if successful; non-zero otherwise.
  1579. *    S2io_WireError  Event number that occured.
  1580. *
  1581. *   NOTES
  1582. *    If this device driver does not understand the specified event
  1583. *    condition then the command returns immediately with S2io_Error
  1584. *    non-zero. A successful return will have S2io_Error set to zero
  1585. *    S2io_WireError set to the event number.
  1586. *
  1587. *    All pending requests for a particular event will be returned
  1588. *    when that event occurs.
  1589. *
  1590. *    All event types that cover a particular condition are returned
  1591. *    when that condition occures. For instance, if an error is
  1592. *    returned by NetBuff.library during receive processing, events
  1593. *    of types S2EVENT_ERROR, S2EVENT_RX and S2EVENT_NETBUFF would
  1594. *    be returned if pending.
  1595. *
  1596. *   SEE ALSO
  1597. *
  1598. *   BUGS
  1599. *
  1600. **********************************************************************
  1601. *
  1602. *   IMPLEMENTATION NOTES
  1603. *
  1604.  
  1605.  
  1606. ******* sana2.device/SANA2CMD_ONLINE *********************************
  1607. *
  1608. *   NAME
  1609. *    Online -- Put a network interface back in service.
  1610. *
  1611. *   FUNCTION
  1612. *    This command places an offline network interface back into
  1613. *    service.
  1614. *
  1615. *   IO REQUEST
  1616. *    S2io_Command    SANA2CMD_ONLINE
  1617. *
  1618. *   RESULTS
  1619. *    S2io_Error      Zero if successful; non-zero otherwise.
  1620. *    S2io_WireError  More specific error number.
  1621. *
  1622. *   NOTES
  1623. *    This command is responsible for putting the network interface
  1624. *    hardware back into a known state and resets the unit global
  1625. *    and special statistics.
  1626. *
  1627. *   SEE ALSO
  1628. *    sana2.device/SANA2CMD_OFFLINE
  1629. *
  1630. *   BUGS
  1631. *
  1632. **********************************************************************
  1633. *
  1634. *   IMPLEMENTATION NOTES
  1635. *
  1636.  
  1637.  
  1638. ******* sana2.device/SANA2CMD_OFFLINE ********************************
  1639. *
  1640. *   NAME
  1641. *    Offline -- Remove interface from service.
  1642. *
  1643. *   FUNCTION
  1644. *    This command removes a network interface from service.
  1645. *
  1646. *   IO REQUEST
  1647. *    S2io_Command    SANA2CMD_OFFLINE
  1648. *
  1649. *   RESULTS
  1650. *    S2io_Error      Zero if successful; non-zero otherwise.
  1651. *    S2io_WireError  More specific error number.
  1652. *
  1653. *   NOTES
  1654. *    Aborts all pending reads and writes with S2io_Error set to
  1655. *    SANA2ERROR_OUTOFSERVICE.
  1656. *
  1657. *    While the interface is offline, all read, writes and any other
  1658. *    command that touches interface hardware will be rejected with
  1659. *    S2io_Error set to SANA2ERROR_OUTOFSERVICE.
  1660. *
  1661. *    This command is intended to permit a network interface to be
  1662. *    tested on an otherwise live system.
  1663. *
  1664. *   SEE ALSO
  1665. *    sana2.device/SANA2CMD_ONLINE
  1666. *
  1667. *   BUGS
  1668. *
  1669. **********************************************************************
  1670. *
  1671. *   IMPLEMENTATION NOTES
  1672. *
  1673.  
  1674.  
  1675. *****i* sana2.device/CMD_START ***************************************
  1676. *
  1677. *   NAME
  1678. *    Start -- Restart device operation.
  1679. *
  1680. *   FUNCTION
  1681. *    Does not apply to this class of device.
  1682. *
  1683. *   IO REQUEST
  1684. *    S2io_Command    CMD_ONLINE
  1685. *
  1686. *   RESULTS
  1687. *    S2io_Error      Zero if successful; non-zero otherwise.
  1688. *
  1689. *   NOTES
  1690. *
  1691. *   SEE ALSO
  1692. *    sana2.device/CMD_STOP
  1693. *
  1694. *   BUGS
  1695. *
  1696. **********************************************************************
  1697. *
  1698. *   IMPLEMENTATION NOTES
  1699. *
  1700. *    Does not apply to this class of device.
  1701. *
  1702.  
  1703.  
  1704. *****i* sana2.device/CMD_STOP ****************************************
  1705. *
  1706. *   NAME
  1707. *    Stop -- Pause device operation.
  1708. *
  1709. *   FUNCTION
  1710. *    Does not apply to this class of device.
  1711. *
  1712. *   IO REQUEST
  1713. *    S2io_Command    CMD_OFFLINE
  1714. *
  1715. *   RESULTS
  1716. *    S2io_Error      Zero if successful; non-zero otherwise.
  1717. *
  1718. *   NOTES
  1719. *
  1720. *   SEE ALSO
  1721. *    sana2.device/CMD_START
  1722. *
  1723. *   BUGS
  1724. *
  1725. **********************************************************************
  1726. *
  1727. *   IMPLEMENTATION NOTES
  1728. *
  1729. *    Does not apply to this class of device.
  1730. *
  1731.  
  1732.  
  1733. *****i* sana2.device/CMD_CLEAR ***************************************
  1734. *
  1735. *   NAME
  1736. *    Clear -- Clear internal network interface read buffers.
  1737. *
  1738. *   FUNCTION
  1739. *    Does not apply to this class of device.
  1740. *
  1741. *   IO REQUEST
  1742. *    S2io_Command    CMD_CLEAR
  1743. *
  1744. *   RESULTS
  1745. *    S2io_Error      Zero if successful; non-zero otherwise.
  1746. *
  1747. *   NOTES
  1748. *
  1749. *   SEE ALSO
  1750. *    sana2.device/UPDATE,
  1751. *    sana2.device/CLEAR
  1752. *
  1753. *   BUGS
  1754. *
  1755. **********************************************************************
  1756. *
  1757. *   IMPLEMENTATION NOTES
  1758. *
  1759. *    Does not apply to this class of device.
  1760. *
  1761.  
  1762.  
  1763. *****i* sana2.device/CMD_FLUSH ***************************************
  1764. *
  1765. *   NAME
  1766. *    Flush -- Clear internal network interface write buffers.
  1767. *
  1768. *   FUNCTION
  1769. *    Does not apply to this class of device.
  1770. *
  1771. *   IO REQUEST
  1772. *    S2io_Command    CMD_FLUSH
  1773. *
  1774. *   RESULTS
  1775. *    S2io_Error      Zero if successful; non-zero otherwise.
  1776. *
  1777. *   NOTES
  1778. *
  1779. *   SEE ALSO
  1780. *    sana2.device/AbortIO(),
  1781. *    sana2.device/CMD_UPDATE,
  1782. *    sana2.device/CMD_CLEAR
  1783. *
  1784. *   BUGS
  1785. *
  1786. **********************************************************************
  1787. *
  1788. *   IMPLEMENTATION NOTES
  1789. *
  1790. *    Does not apply to this class of device.
  1791. *
  1792.  
  1793.  
  1794. *****i* sana2.device/CMD_INVALID *************************************
  1795. *
  1796. *   NAME
  1797. *    Invalid -- Return with error IOERR_NOCMD.
  1798. *
  1799. *   FUNCTION
  1800. *    This command causes device driver to reply with an error
  1801. *    IOERR_NOCMD as defined in exec/errors.h indicating the command
  1802. *    is not supported.
  1803. *
  1804. *   IO REQUEST
  1805. *    S2io_Command    CMD_INVALID
  1806. *
  1807. *   RESULTS
  1808. *    S2io_Error      Zero if successful; non-zero otherwise.
  1809. *
  1810. *   NOTES
  1811. *
  1812. *   SEE ALSO
  1813. *
  1814. *   BUGS
  1815. *    Not known to be useful at this time.
  1816. *
  1817. **********************************************************************
  1818. *
  1819. *   IMPLEMENTATION NOTES
  1820. *
  1821.  
  1822.  
  1823. *****i* sana2.device/CMD_RESET ***************************************
  1824. *
  1825. *   NAME
  1826. *    Reset -- Reset the network interface to initialized state.
  1827. *
  1828. *   FUNCTION
  1829. *    Does not apply to this class of device.
  1830. *
  1831. *   IO REQUEST 
  1832. *    S2io_Command    CMD_RESET 
  1833. *
  1834. *   RESULTS 
  1835. *    S2io_Error      Zero if successful; non-zero otherwise.
  1836. *
  1837. *   NOTES
  1838. *
  1839. *   SEE ALSO
  1840. *
  1841. *   BUGS
  1842. *
  1843. **********************************************************************
  1844. *
  1845. *   IMPLEMENTATION NOTES
  1846. *
  1847. *    Does not apply to this class of device.
  1848. *
  1849.  
  1850.  
  1851. *****i* sana2.device/CMD_UPDATE **************************************
  1852. *
  1853. *   NAME
  1854. *    Update -- Force packets out to device
  1855. *
  1856. *   FUNCTION
  1857. *    Does not apply to this class of device.
  1858. *
  1859. *   IO REQUEST
  1860. *    S2io_Command    CMD_UPDATE
  1861. *
  1862. *   RESULTS
  1863. *    S2io_Error      Zero if successful; non-zero otherwise.
  1864. *
  1865. *   NOTES
  1866. *
  1867. *   SEE ALSO
  1868. *    sana2.device/CMD_CLEAR,
  1869. *    sana2.device/CMD_FLUSH
  1870. *
  1871. *   BUGS
  1872. *
  1873. **********************************************************************
  1874. *
  1875. *   IMPLEMENTATION NOTES
  1876. *
  1877. *    Does not apply to this class of device.
  1878. *
  1879.  
  1880.  
  1881.